(function () {
    function WaitingForStart () {
        WaitingForStart.super(this);
        this._status = false;
    }
    Laya.class(WaitingForStart, "ui.Room.Waiting", ui.Room.WaitingUI);
    var _proto = WaitingForStart.prototype;
    _proto.loop = function () {
        for(var i = 1; i <= 7; i++){
            (function (i) {
                var timeline = new Laya.TimeLine();
                var target   = this["waiting_" + i];

                Laya.Tween.to(target, {y : -30}, 300, null, Laya.Handler.create(target, function () {
                    Laya.Tween.to(this, {y : 0}, 300);
                }), i * 300);
            }).call(this, i);
        }
        if(this._status){
            setTimeout(this.loop.bind(this), 2500);
        }
    }

    _proto.display = function () {
        Arena.Stage.addChild(this);

        this._status = true;
        this.loop();
    }
    _proto.close = function () {
        this._status = false;
        this.removeSelf();
    }
})();